package com.sina.weibo;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.Toast;
import com.sina.weibo.models.MBlog;
import com.sina.weibo.models.User;
import com.sina.weibo.models.UserInfo;
import com.sina.weibo.models.UserRankItem;
import com.sina.weibo.view.MBlogListItemView;
import com.sina.weibo.view.MainListItemView;
import com.sina.weibo.view.UserInfoListItemView;
import com.sina.weibo.view.UserRankItemView;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

public class LookAroundListActivity extends ListBaseActivity
{
  public static int mAttendCount = 0;
  private final int SHOW_NAVIGATER = 0;
  WeiboListAdapter adapter;
  Handler handler;
  private boolean isFamousMode = 0;
  private ListView mLv;
  private int mMode = 9;
  private boolean mPrefShowPicture = 1;
  private int mReadMode;

  public LookAroundListActivity()
  {
    LookAroundListActivity.1 local1 = new LookAroundListActivity.1(this);
    this.handler = local1;
  }

  private void cleanListFile()
  {
    switch (this.mMode)
    {
    default:
    case 9:
    case 10:
    case 11:
    }
    while (true)
    {
      return;
      Utils.cleanLookAroundListFile(this.mCacheDir);
      continue;
      Utils.cleanTopUserListFile(this.mCacheDir);
      continue;
      Utils.cleanHotForwardListFile(this.mCacheDir);
    }
  }

  private void newUserWarning()
  {
    AlertDialog.Builder localBuilder1 = new AlertDialog.Builder(this);
    AlertDialog.Builder localBuilder2 = localBuilder1.setTitle(2131427352);
    AlertDialog.Builder localBuilder3 = localBuilder1.setMessage(2131427353);
    LookAroundListActivity.2 local2 = new LookAroundListActivity.2(this);
    AlertDialog.Builder localBuilder4 = localBuilder1.setPositiveButton(2131427332, local2);
    AlertDialog localAlertDialog = localBuilder1.show();
  }

  private void reloadWeiboList()
  {
    reloadBegine(0);
    Intent localIntent = new Intent("sina.weibo.action.UPDATED");
    sendBroadcast(localIntent);
    if (this.mTaskFree)
    {
      this.mPage = 1;
      String str = String.valueOf(this.mPage);
      ListBaseActivity.FetchDataTask localFetchDataTask1 = new ListBaseActivity.FetchDataTask(this);
      this.mTask = localFetchDataTask1;
      ListBaseActivity.FetchDataTask localFetchDataTask2 = this.mTask;
      String[] arrayOfString = new String[1];
      arrayOfString[0] = str;
      AsyncTask localAsyncTask = localFetchDataTask2.execute(arrayOfString);
    }
  }

  protected void doItemMenu(String paramString)
  {
    Resources localResources = getResources();
    int i = this.mExpectItem - 1;
    String str1 = localResources.getString(2131427510);
    if (paramString.equals(str1))
    {
      MBlog localMBlog1 = (MBlog)this.mList.get(i);
      Intent localIntent1 = Utils.forwardMBlog(this, localMBlog1);
      startActivity(localIntent1);
    }
    while (true)
    {
      return;
      String str2 = localResources.getString(2131427516);
      MBlog localMBlog2;
      if (paramString.equals(str2))
      {
        localMBlog2 = (MBlog)this.mList.get(i);
        try
        {
          RPCHelper localRPCHelper1 = RPCHelper.getInstance(getApplication());
          User localUser1 = StaticInfo.mUser;
          String str3 = localMBlog2.mblogid;
          if (!((Boolean)localRPCHelper1.addFavMBlog(localUser1, str3)[0]).booleanValue())
            break label176;
          String str4 = this.mCacheDir;
          User localUser2 = StaticInfo.mUser;
          Utils.cleanFavoriteListFile(str4, localUser2);
          String str5 = getString(2131427482);
          Toast.makeText(this, str5, 0).show();
        }
        catch (RPCHelper.HttpException localHttpException1)
        {
        }
        continue;
        label176: String str6 = getString(2131427483);
        Toast.makeText(this, str6, 0).show();
        continue;
      }
      String str7 = localResources.getString(2131427514);
      if (paramString.equals(str7))
      {
        localMBlog2 = (MBlog)this.mList.get(i);
        try
        {
          RPCHelper localRPCHelper2 = RPCHelper.getInstance(getApplication());
          User localUser3 = StaticInfo.mUser;
          String str8 = localMBlog2.favid;
          String str9 = localMBlog2.mblogid;
          if (!localRPCHelper2.deleteFavMBlog(localUser3, str8, str9))
            continue;
          boolean bool1 = this.mList.remove(localMBlog2);
          int j = this.mTotals - 1;
          this.mTotals = j;
          this.mExpectItem = 0;
          this.adapter.notifyDataSetChanged();
        }
        catch (RPCHelper.HttpException localHttpException2)
        {
        }
        continue;
      }
      String str10 = localResources.getString(2131427515);
      if (paramString.equals(str10))
      {
        localMBlog2 = (MBlog)this.mList.get(i);
        try
        {
          RPCHelper localRPCHelper3 = RPCHelper.getInstance(getApplication());
          User localUser4 = StaticInfo.mUser;
          String str11 = localMBlog2.mblogid;
          if (!localRPCHelper3.deleteMBlog(localUser4, str11))
            continue;
          boolean bool2 = this.mList.remove(localMBlog2);
          int k = this.mTotals - 1;
          this.mTotals = k;
          this.mExpectItem = 0;
          ((WeiboListAdapter)this.mLv.getAdapter()).refresh();
        }
        catch (RPCHelper.HttpException localHttpException3)
        {
        }
        continue;
      }
      String str12 = localResources.getString(2131427511);
      if (paramString.equals(str12))
      {
        MBlog localMBlog3 = (MBlog)this.mList.get(i);
        String str13 = localMBlog3.mblogid;
        String str14 = localMBlog3.uid;
        Intent localIntent2 = Utils.simpleComment(this, str13, str14);
        startActivity(localIntent2);
        continue;
      }
      String str15 = localResources.getString(2131427518);
      if (paramString.equals(str15))
      {
        Intent localIntent3 = new Intent(this, UserInfoActivity2.class);
        MBlog localMBlog4 = (MBlog)this.mList.get(i);
        String str16 = localMBlog4.uid;
        Intent localIntent4 = localIntent3.putExtra("uid", str16);
        String str17 = localMBlog4.nick;
        Intent localIntent5 = localIntent3.putExtra("nick", str17);
        boolean bool3 = localMBlog4.vip;
        Intent localIntent6 = localIntent3.putExtra("vip", bool3);
        String str18 = StaticInfo.mUser.uid;
        Intent localIntent7 = localIntent3.putExtra("myuid", str18);
        startActivity(localIntent3);
        continue;
      }
      String str19 = localResources.getString(2131427508);
      if (paramString.equals(str19))
      {
        localMBlog2 = (MBlog)this.mList.get(i);
        try
        {
          String str20 = this.mCacheDir;
          String str21 = localMBlog2.portrait;
          String str22 = Utils.checkCache(str20, str21);
          boolean bool4 = new File(str22).delete();
          ((WeiboListAdapter)this.mLv.getAdapter()).refresh();
        }
        catch (NullPointerException localNullPointerException1)
        {
        }
        continue;
      }
      String str23 = localResources.getString(2131427507);
      if (paramString.equals(str23))
      {
        localMBlog2 = (MBlog)this.mList.get(i);
        try
        {
          String str24 = this.mCacheDir;
          String str25 = localMBlog2.pic;
          String str26 = Utils.checkCache(str24, str25);
          boolean bool5 = new File(str26).delete();
          ((WeiboListAdapter)this.mLv.getAdapter()).refresh();
        }
        catch (NullPointerException localNullPointerException2)
        {
        }
        continue;
      }
      if (paramString.startsWith("@"))
      {
        Intent localIntent8 = new Intent(this, UserInfoActivity2.class);
        String str27 = paramString.substring(1);
        Intent localIntent9 = localIntent8.putExtra("nick", str27);
        String str28 = StaticInfo.mUser.uid;
        Intent localIntent10 = localIntent8.putExtra("myuid", str28);
        Intent localIntent11 = localIntent8.putExtra("vip", 0);
        startActivity(localIntent8);
        continue;
      }
      if (paramString.startsWith("#"))
        continue;
      Uri localUri = Uri.parse(paramString);
      Intent localIntent12 = new Intent("android.intent.action.VIEW", localUri);
      startActivity(localIntent12);
    }
  }

  protected BaseAdapter getAdapter()
  {
    if (this.adapter == null)
    {
      WeiboListAdapter localWeiboListAdapter1 = new WeiboListAdapter();
      this.adapter = localWeiboListAdapter1;
    }
    if (this.adapter != null);
    for (WeiboListAdapter localWeiboListAdapter2 = this.adapter; ; localWeiboListAdapter2 = null)
      return localWeiboListAdapter2;
  }

  protected List<CharSequence> getMenuContent()
  {
    Resources localResources = getResources();
    ArrayList localArrayList = new ArrayList();
    String str1 = localResources.getString(2131427510);
    boolean bool1 = localArrayList.add(str1);
    String str2 = localResources.getString(2131427511);
    boolean bool2 = localArrayList.add(str2);
    String str3 = localResources.getString(2131427516);
    boolean bool3 = localArrayList.add(str3);
    String str4 = localResources.getString(2131427518);
    boolean bool4 = localArrayList.add(str4);
    return localArrayList;
  }

  protected Object[] getMessages(int paramInt1, int paramInt2)
  {
    Object[] arrayOfObject1 = (Object[])0;
    try
    {
      switch (this.mMode)
      {
      default:
        if (arrayOfObject1 != null)
          break;
      case 9:
      case 10:
      case 11:
      case 7:
      case 8:
      }
      Object[] arrayOfObject3;
      for (int i = this.mTotals; ; arrayOfObject2 = arrayOfObject3)
      {
        this.mTotals = i;
        arrayOfObject2 = arrayOfObject1;
        return arrayOfObject2;
        RPCHelper localRPCHelper1 = RPCHelper.getInstance(getApplication());
        int j = MainTabActivity.mPrefPictureSize;
        int k = paramInt1;
        int m = paramInt2;
        arrayOfObject1 = localRPCHelper1.getNewsList("1641537045", "1", j, k, m);
        break;
        arrayOfObject1 = RPCHelper.getInstance(getApplication()).getTopUserList("1641537045", paramInt2);
        break;
        RPCHelper localRPCHelper2 = RPCHelper.getInstance(getApplication());
        int n = MainTabActivity.mPrefPictureSize;
        int i1 = paramInt1;
        int i2 = paramInt2;
        arrayOfObject1 = localRPCHelper2.getNewsList("1641537045", "2", n, i1, i2);
        break;
        RPCHelper localRPCHelper3 = RPCHelper.getInstance(getApplication());
        User localUser1 = StaticInfo.mUser;
        arrayOfObject1 = localRPCHelper3.getUserRankList(localUser1, 2, paramInt1, paramInt2);
        break;
        RPCHelper localRPCHelper4 = RPCHelper.getInstance(getApplication());
        User localUser2 = StaticInfo.mUser;
        arrayOfObject1 = localRPCHelper4.getUserRankList(localUser2, 1, paramInt1, paramInt2);
        break;
        arrayOfObject3 = ((Integer)arrayOfObject1[0]).intValue();
      }
    }
    catch (RPCHelper.HttpException localHttpException)
    {
      while (true)
        Object[] arrayOfObject2 = null;
    }
  }

  protected void handleListItemClickEvent(int paramInt)
  {
    Resources localResources = getResources();
    int i = this.mExpectItem - 1;
    switch (paramInt)
    {
    default:
    case 0:
    case 1:
    }
    while (true)
    {
      return;
      if (StaticInfo.mUser != null)
        switch (this.mMode)
        {
        case 10:
        default:
          break;
        case 9:
        case 11:
          ArrayList localArrayList = new ArrayList();
          MBlog localMBlog1 = (MBlog)this.mList.get(i);
          String str1 = localResources.getString(2131427510);
          boolean bool1 = localArrayList.add(str1);
          String str2 = localResources.getString(2131427511);
          boolean bool2 = localArrayList.add(str2);
          String str3 = localResources.getString(2131427516);
          boolean bool3 = localArrayList.add(str3);
          String str4 = localResources.getString(2131427518);
          boolean bool4 = localArrayList.add(str4);
          showItemMenu(localArrayList);
          break;
        }
      String str5 = getString(2131427543);
      Toast.makeText(this, str5, 1).show();
      continue;
      if (StaticInfo.mUser != null)
        switch (this.mMode)
        {
        default:
          break;
        case 9:
        case 11:
          MBlog localMBlog2 = (MBlog)this.mList.get(i);
          Intent localIntent1 = new Intent();
          Context localContext = getApplicationContext();
          Intent localIntent2 = localIntent1.setClass(localContext, DetailWeiboActivity.class).putExtra("KEY_MBLOG", localMBlog2);
          User localUser = StaticInfo.mUser;
          Intent localIntent3 = localIntent2.putExtra("KEY_MUSR", localUser);
          startActivity(localIntent3);
          break;
        case 10:
          UserInfo localUserInfo = (UserInfo)this.mList.get(i);
          Intent localIntent4 = new Intent(this, UserInfoActivity2.class);
          String str6 = localUserInfo.uid;
          Intent localIntent5 = localIntent4.putExtra("uid", str6);
          String str7 = localUserInfo.nick;
          Intent localIntent6 = localIntent4.putExtra("nick", str7);
          boolean bool5 = localUserInfo.vip;
          Intent localIntent7 = localIntent4.putExtra("vip", bool5);
          startActivity(localIntent4);
          break;
        }
      String str8 = getString(2131427543);
      Toast.makeText(this, str8, 1).show();
    }
  }

  protected void handleTaskResult(List<?> paramList, String paramString)
  {
    if ((paramList != null) && (paramList.size() > 0))
      if (this.mList == null)
      {
        this.mList = paramList;
        if (this.mList != null);
        switch (this.mMode)
        {
        default:
          int i = this.mMode;
          List localList1 = this.mList;
          saveListCache(i, localList1);
          if (this.mList.size() <= 0)
            break;
          ((WeiboListAdapter)this.mLv.getAdapter()).refresh();
          if (this.mExpectItem != 0)
          {
            ListView localListView = this.mLv;
            int j = this.mExpectItem;
            localListView.setSelection(j);
          }
          this.mLv.setVisibility(0);
          this.mLv.setFocusable(1);
          this.mLv.setFocusableInTouchMode(1);
        case 10:
        }
      }
    while (true)
    {
      return;
      List localList2 = this.mList;
      UserInfo[] arrayOfUserInfo1 = new UserInfo[0];
      UserInfo[] arrayOfUserInfo2 = (UserInfo[])localList2.toArray(arrayOfUserInfo1);
      LookAroundListActivity.3 local3 = new LookAroundListActivity.3(this);
      Arrays.sort(arrayOfUserInfo2, local3);
      ArrayList localArrayList1 = new ArrayList();
      this.mList = localArrayList1;
      int k = 0;
      while (true)
      {
        int m = arrayOfUserInfo2.length;
        if (k >= m)
          break;
        List localList3 = this.mList;
        UserInfo localUserInfo1 = arrayOfUserInfo2[k];
        boolean bool1 = localList3.add(localUserInfo1);
        k += 1;
      }
      switch (this.mMode)
      {
      default:
      case 10:
      case 9:
      case 11:
      case 8:
      }
      while (true)
      {
        int n = this.mMode;
        List localList4 = this.mList;
        saveListCache(n, localList4);
        break;
        label332: Iterator localIterator2;
        if (paramList.size() > 0)
        {
          localIterator1 = paramList.iterator();
          if (!localIterator1.hasNext())
          {
            List localList5 = this.mList;
            UserInfo[] arrayOfUserInfo3 = new UserInfo[0];
            arrayOfUserInfo2 = (UserInfo[])localList5.toArray(arrayOfUserInfo3);
            LookAroundListActivity.4 local4 = new LookAroundListActivity.4(this);
            Arrays.sort(arrayOfUserInfo2, local4);
            ArrayList localArrayList2 = new ArrayList();
            this.mList = localArrayList2;
            k = 0;
          }
          while (true)
          {
            int i1 = arrayOfUserInfo2.length;
            if (k >= i1)
            {
              List localList6 = this.mList;
              String str1 = this.mCacheDir;
              Utils.saveTopUserListFile(localList6, str1);
              break;
              UserInfo localUserInfo2 = (UserInfo)localIterator1.next();
              localIterator2 = this.mList.iterator();
              String str2;
              String str3;
              do
              {
                if (!localIterator2.hasNext())
                {
                  boolean bool2 = this.mList.add(localUserInfo2);
                  break;
                }
                UserInfo localUserInfo3 = (UserInfo)localIterator2.next();
                str2 = localUserInfo2.uid;
                str3 = localUserInfo3.uid;
              }
              while (!str2.equals(str3));
              break label332;
            }
            List localList7 = this.mList;
            UserInfo localUserInfo4 = arrayOfUserInfo2[k];
            boolean bool3 = localList7.add(localUserInfo4);
            k += 1;
          }
        }
        int i2 = this.mPage - 1;
        this.mPage = i2;
        continue;
        Iterator localIterator1 = paramList.iterator();
        Object localObject;
        while (localIterator1.hasNext())
        {
          localObject = (MBlog)localIterator1.next();
          localIterator2 = this.mList.iterator();
          String str4;
          String str5;
          do
          {
            if (!localIterator2.hasNext())
            {
              boolean bool4 = this.mList.add(localObject);
              break;
            }
            MBlog localMBlog = (MBlog)localIterator2.next();
            str4 = ((MBlog)localObject).mblogid;
            str5 = localMBlog.mblogid;
          }
          while (!str4.equals(str5));
        }
        if (paramList.size() > 0)
        {
          localIterator1 = paramList.iterator();
          while (localIterator1.hasNext())
          {
            localObject = (UserRankItem)localIterator1.next();
            localIterator2 = this.mList.iterator();
            String str6;
            String str7;
            do
            {
              if (!localIterator2.hasNext())
              {
                boolean bool5 = this.mList.add(localObject);
                break;
              }
              UserRankItem localUserRankItem = (UserRankItem)localIterator2.next();
              str6 = ((UserRankItem)localObject).uid;
              str7 = localUserRankItem.uid;
            }
            while (!str6.equalsIgnoreCase(str7));
          }
          continue;
        }
        int i3 = this.mPage - 1;
        this.mPage = i3;
      }
      this.mLv.setVisibility(4);
      cleanListFile();
      continue;
      int i4 = this.mPage - 1;
      this.mPage = i4;
      String str8 = getString(2131427376);
      Toast.makeText(this, str8, 0).show();
      int i5 = this.mMode;
      loadCache(i5);
    }
  }

  protected void handleTitleBarEvent(int paramInt)
  {
    switch (paramInt)
    {
    default:
    case 0:
    case 1:
    }
    while (true)
    {
      return;
      setResult(-1, null);
      finish();
      continue;
      finish();
    }
  }

  protected void loadCache()
  {
    int i = this.mMode;
    loadCache(i);
  }

  protected void loadCache(int paramInt)
  {
    switch (paramInt)
    {
    default:
    case 10:
    case 11:
    case 9:
    }
    while (true)
    {
      int[] arrayOfInt = StaticInfo.mTotals;
      int i = MainTabActivity.mMode;
      int j = arrayOfInt[i];
      this.mTotals = j;
      return;
      List localList1 = Utils.loadTopUserListFile(this.mCacheDir);
      continue;
      List localList2 = Utils.loadHotForwardListFile(this.mCacheDir);
      continue;
      List localList3 = Utils.loadLookAroundListFile(this.mCacheDir);
    }
  }

  protected void loadMore(int paramInt)
  {
    reloadBegine(0);
    this.mExpectItem = paramInt;
    ListBaseActivity.FetchDataTask localFetchDataTask1 = new ListBaseActivity.FetchDataTask(this);
    this.mTask = localFetchDataTask1;
    int i = this.mPage + 1;
    this.mPage = i;
    String str = String.valueOf(i);
    ListBaseActivity.FetchDataTask localFetchDataTask2 = this.mTask;
    String[] arrayOfString = new String[1];
    arrayOfString[0] = str;
    AsyncTask localAsyncTask = localFetchDataTask2.execute(arrayOfString);
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    ListView localListView = this.mlvBase;
    this.mLv = localListView;
    int i = getIntent().getIntExtra("mode", 9);
    this.mMode = i;
    if (this.mMode == 8);
    for (int j = 1; ; j = 0)
    {
      this.isFamousMode = j;
      switch (this.mMode)
      {
      default:
        int k = this.mMode;
        loadCache(k);
        return;
      case 9:
      case 10:
      case 11:
      case 8:
      }
    }
    String str2 = getString(2131427416);
    String str3 = getString(2131427528);
    setTitleBar(1, str3, str2, null);
    if (StaticInfo.mUser == null);
    for (String str1 = null; ; str1 = StaticInfo.mUser.nick)
    {
      setAppTitle(str2, str1);
      break;
    }
    str2 = getString(2131427417);
    String str4 = getString(2131427528);
    setTitleBar(1, str4, str2, null);
    if (StaticInfo.mUser == null);
    for (str1 = null; ; str1 = StaticInfo.mUser.nick)
    {
      setAppTitle(str2, str1);
      break;
    }
    str2 = getString(2131427418);
    String str5 = getString(2131427528);
    setTitleBar(1, str5, str2, null);
    if (StaticInfo.mUser == null);
    for (str1 = null; ; str1 = StaticInfo.mUser.nick)
    {
      setAppTitle(str2, str1);
      break;
    }
    str2 = getString(2131427678);
    String str6 = getString(2131427671);
    setTitleBar(1, null, str2, str6);
    if (StaticInfo.mUser == null);
    for (str1 = null; ; str1 = StaticInfo.mUser.nick)
    {
      setAppTitle(str2, str1);
      break;
    }
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    return false;
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    boolean bool = super.onOptionsItemSelected(paramMenuItem);
    return true;
  }

  protected void onPause()
  {
    super.onPause();
    if (this.mPgToast != null)
      this.mPgToast.cancel();
    if ((!this.mTaskFree) && (this.mTask != null) && (!this.mTask.isCancelled()))
    {
      this.mTaskFree = 1;
      boolean bool = this.mTask.cancel(1);
    }
  }

  protected void onResume()
  {
    super.onResume();
    int i = getSharedPreferences("readmode", 0).getInt("readmode", 0);
    if (this.mReadMode != i)
    {
      this.mReadMode = i;
      this.adapter.notifyDataSetChanged();
    }
    if (SwitchUser.mCurrentNewAccount)
    {
      SwitchUser.mCurrentNewAccount = 0;
      newUserWarning();
    }
    this.mLv.setVisibility(4);
    if (this.mList == null)
      reloadList();
    while (true)
    {
      return;
      this.adapter.notifyDataSetChanged();
      this.mLv.setFocusable(1);
      this.mLv.setFocusableInTouchMode(1);
      this.mLv.setVisibility(0);
    }
  }

  protected void reloadList()
  {
    reloadBegine(1);
    this.mBeReload = 1;
    this.mPage = 1;
    this.mNewCount = 0;
    if (this.mTaskFree)
    {
      String str = String.valueOf(this.mPage);
      ListBaseActivity.FetchDataTask localFetchDataTask1 = new ListBaseActivity.FetchDataTask(this);
      this.mTask = localFetchDataTask1;
      ListBaseActivity.FetchDataTask localFetchDataTask2 = this.mTask;
      String[] arrayOfString = new String[1];
      arrayOfString[0] = str;
      AsyncTask localAsyncTask = localFetchDataTask2.execute(arrayOfString);
    }
    this.mExpectItem = 1;
  }

  protected void saveListCache(int paramInt, List<?> paramList)
  {
    switch (paramInt)
    {
    default:
    case 10:
    case 11:
    case 9:
    }
    while (true)
    {
      return;
      String str1 = this.mCacheDir;
      Utils.saveTopUserListFile(paramList, str1);
      continue;
      String str2 = this.mCacheDir;
      Utils.saveHotForwardListFile(paramList, str2);
      continue;
      String str3 = this.mCacheDir;
      Utils.saveLookAroundListFile(paramList, str3);
    }
  }

  protected void setContentView()
  {
    setView(2130903060);
  }

  class WeiboListAdapter extends BaseAdapter
  {
    public WeiboListAdapter()
    {
    }

    public int getCount()
    {
      int i;
      if (LookAroundListActivity.this.mList == null)
        i = 0;
      while (true)
      {
        return i;
        switch (LookAroundListActivity.this.mMode)
        {
        default:
          i = LookAroundListActivity.this.mList.size() + 2;
          break;
        case 10:
          i = LookAroundListActivity.this.mList.size() + 2;
        }
      }
    }

    public Object getItem(int paramInt)
    {
      return Integer.valueOf(paramInt);
    }

    public long getItemId(int paramInt)
    {
      return paramInt;
    }

    public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
    {
      Object localObject1 = null;
      paramInt += -1;
      int i = paramInt;
      int j = -1;
      Object localObject2;
      if (i == j)
      {
        localObject2 = LookAroundListActivity.this.getReloadView();
        return localObject2;
      }
      int k = LookAroundListActivity.this.mList.size();
      int m = paramInt;
      int n = k;
      if (m == n)
      {
        localObject1 = LookAroundListActivity.this.getLoadMoreView();
        switch (LookAroundListActivity.this.mMode)
        {
        default:
          int i1 = LookAroundListActivity.this.mList.size();
          int i2 = LookAroundListActivity.this.mTotals;
          if (i1 >= i2)
            break;
          ((View)localObject1).setVisibility(0);
        case 10:
        }
        while (true)
        {
          localObject2 = localObject1;
          break;
          int i3 = LookAroundListActivity.this.mTotals;
          if (25 > i3)
          {
            ((View)localObject1).setVisibility(4);
            continue;
          }
          ((View)localObject1).setVisibility(0);
          continue;
          ((View)localObject1).setVisibility(4);
        }
      }
      int i4 = 1;
      int i5 = 1;
      switch (LookAroundListActivity.this.mMode)
      {
      default:
      case 10:
      case 9:
      case 11:
        while (true)
        {
          localObject2 = localObject1;
          break;
          if (paramView == null)
          {
            LookAroundListActivity localLookAroundListActivity1 = LookAroundListActivity.this;
            ListView localListView1 = LookAroundListActivity.this.mLv;
            List localList1 = LookAroundListActivity.this.mList;
            int i6 = paramInt;
            UserInfo localUserInfo1 = (UserInfo)localList1.get(i6);
            int i7 = LookAroundListActivity.this.mReadMode;
            localObject1 = new UserInfoListItemView(localLookAroundListActivity1, localListView1, localUserInfo1, i5, i7);
            continue;
          }
          localObject1 = paramView;
          try
          {
            UserInfoListItemView localUserInfoListItemView = (UserInfoListItemView)localObject1;
            List localList2 = LookAroundListActivity.this.mList;
            int i8 = paramInt;
            Object localObject3 = localList2.get(i8);
            int i9 = LookAroundListActivity.this.mReadMode;
            localUserInfoListItemView.update(localObject3, i5, i9);
          }
          catch (Exception localException1)
          {
            LookAroundListActivity localLookAroundListActivity2 = LookAroundListActivity.this;
            ListView localListView2 = LookAroundListActivity.this.mLv;
            List localList3 = LookAroundListActivity.this.mList;
            int i10 = paramInt;
            UserInfo localUserInfo2 = (UserInfo)localList3.get(i10);
            int i11 = LookAroundListActivity.this.mReadMode;
            localObject1 = new UserInfoListItemView(localLookAroundListActivity2, localListView2, localUserInfo2, i5, i11);
          }
          continue;
          if (paramView == null)
          {
            localObject1 = new com/sina/weibo/view/MBlogListItemView;
            LookAroundListActivity localLookAroundListActivity3 = LookAroundListActivity.this;
            ListView localListView3 = LookAroundListActivity.this.mLv;
            List localList4 = LookAroundListActivity.this.mList;
            int i12 = paramInt;
            MBlog localMBlog1 = (MBlog)localList4.get(i12);
            int i13 = LookAroundListActivity.this.mReadMode;
            Object localObject4 = localObject1;
            int i14 = i5;
            localObject4.<init>(localLookAroundListActivity3, localListView3, localMBlog1, i4, i14, 0, 0, i13);
            continue;
          }
          localObject1 = paramView;
          try
          {
            MainListItemView localMainListItemView = (MainListItemView)localObject1;
            List localList5 = LookAroundListActivity.this.mList;
            int i15 = paramInt;
            Object localObject5 = localList5.get(i15);
            int i16 = LookAroundListActivity.this.mReadMode;
            int i17 = i5;
            localMainListItemView.update(localObject5, i4, i17, 0, i16);
          }
          catch (Exception localException2)
          {
            localObject1 = new com/sina/weibo/view/MBlogListItemView;
            LookAroundListActivity localLookAroundListActivity4 = LookAroundListActivity.this;
            ListView localListView4 = LookAroundListActivity.this.mLv;
            List localList6 = LookAroundListActivity.this.mList;
            int i18 = paramInt;
            MBlog localMBlog2 = (MBlog)localList6.get(i18);
            int i19 = LookAroundListActivity.this.mReadMode;
            Object localObject6 = localObject1;
            int i20 = i5;
            localObject6.<init>(localLookAroundListActivity4, localListView4, localMBlog2, i4, i20, 0, 0, i19);
          }
        }
      case 7:
      case 8:
      }
      if (paramView == null)
      {
        localObject1 = new com/sina/weibo/view/UserRankItemView;
        LookAroundListActivity localLookAroundListActivity5 = LookAroundListActivity.this;
        ListView localListView5 = LookAroundListActivity.this.mLv;
        List localList7 = LookAroundListActivity.this.mList;
        int i21 = paramInt;
        UserRankItem localUserRankItem1 = (UserRankItem)localList7.get(i21);
        int i22 = LookAroundListActivity.this.mReadMode;
        Object localObject7 = localObject1;
        int i23 = i5;
        localObject7.<init>(localLookAroundListActivity5, localListView5, localUserRankItem1, i4, i23, i22);
      }
      while (true)
      {
        localObject2 = localObject1;
        break;
        localObject1 = paramView;
        try
        {
          UserRankItemView localUserRankItemView = (UserRankItemView)localObject1;
          List localList8 = LookAroundListActivity.this.mList;
          int i24 = paramInt;
          Object localObject8 = localList8.get(i24);
          int i25 = LookAroundListActivity.this.mReadMode;
          int i26 = i5;
          localUserRankItemView.update(localObject8, i4, i26, 0, i25);
        }
        catch (Exception localException3)
        {
          localObject1 = new com/sina/weibo/view/UserRankItemView;
          LookAroundListActivity localLookAroundListActivity6 = LookAroundListActivity.this;
          ListView localListView6 = LookAroundListActivity.this.mLv;
          List localList9 = LookAroundListActivity.this.mList;
          int i27 = paramInt;
          UserRankItem localUserRankItem2 = (UserRankItem)localList9.get(i27);
          int i28 = LookAroundListActivity.this.mReadMode;
          Object localObject9 = localObject1;
          int i29 = i5;
          localObject9.<init>(localLookAroundListActivity6, localListView6, localUserRankItem2, i4, i29, i28);
        }
      }
    }

    public int getViewTypeCount()
    {
      if (LookAroundListActivity.this.mList == null);
      for (int i = 1; ; i = 4)
        return i;
    }

    public void refresh()
    {
      notifyDataSetChanged();
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.LookAroundListActivity
 * JD-Core Version:    0.6.0
 */